ngl: Avoid a goto
authorMatthias Clasen <mclasen@redhat.com>
Mon, 29 Mar 2021 00:53:46 +0000 (20:53 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Tue, 30 Mar 2021 04:34:52 +0000 (00:34 -0400)
Reshuffle the code slightly, so we can use a continue
instead.

gsk/ngl/gsknglrenderjob.c

index fa2c9c8cb9d2a90ed326c1cb6a4814da0a1b5c34..5dfd78b5c8198408302301bffce61d4c8b546b31 100644 (file)
@@ -2736,9 +2736,11 @@ gsk_ngl_render_job_visit_text_node (GskNglRenderJob     *job,
           cy = ypos;
         }
 
+      x_position += gi->geometry.width;
+
       texture_id = gsk_ngl_glyph_library_lookup_or_add (library, &lookup, &glyph);
       if G_UNLIKELY (texture_id == 0)
-        goto next;
+        continue;
 
       if G_UNLIKELY (last_texture != texture_id)
         {
@@ -2784,9 +2786,6 @@ gsk_ngl_render_job_visit_text_node (GskNglRenderJob     *job,
 
       batch->draw.vbo_count += GSK_NGL_N_VERTICES;
       used++;
-
-next:
-      x_position += gi->geometry.width;
     }
 
   if (used != num_glyphs)